package com.efg.games.superclick.my
{
    import flash.display.Sprite;
    import flash.text.TextField;
    
    /**
     * ...
     * @author jianping.shenjp
     */
    public class ScoreTextField extends Sprite implements IDispose,IUpdate
    {
        private var _tf:TextField;
        private var _currentlife:int;
        private var _life:int;
        
        public function ScoreTextField(text:String, life:int)
        {
            _tf = new TextField();
            _tf.textColor = 0xFFFFFF;
            _tf.text = text;
            addChild(_tf);
            _life = life;
            _currentlife = 0;
        }
        
        public function update():void
        {
            _currentlife++;
        }
        
        public function isDispose():Boolean
        {
            if (_currentlife > _life)
            {
                return true;
            }
            return false;
        }
        
        public function dispose():void
        {
            removeChild(_tf);
            _tf = null;
        }
    
    }

}